#ifndef __CA51F003_XDATA_H__
#define __CA51F003_XDATA_H__

#ifdef _MAIN_C_
#define XRAM_U8										volatile unsigned char xdata
#define XRAM_U16									volatile unsigned int xdata
#define XRAM_AT_(x)									_at_ x		
#else
#define XRAM_U8										extern volatile unsigned char xdata
#define XRAM_U16									extern volatile unsigned int xdata
#define XRAM_AT_(x)
#endif

XRAM_U8 P00F        XRAM_AT_(0x8000);
XRAM_U8 P01F        XRAM_AT_(0x8001);
XRAM_U8 P02F        XRAM_AT_(0x8002);
XRAM_U8 P03F        XRAM_AT_(0x8003);
XRAM_U8 P04F        XRAM_AT_(0x8004);
XRAM_U8 P05F        XRAM_AT_(0x8005);
XRAM_U8 P06F        XRAM_AT_(0x8006);
XRAM_U8 P07F        XRAM_AT_(0x8007);

XRAM_U8 P10F        XRAM_AT_(0x8008);
XRAM_U8 P11F        XRAM_AT_(0x8009);
XRAM_U8 P12F        XRAM_AT_(0x800a);
XRAM_U8 P13F        XRAM_AT_(0x800b);
XRAM_U8 P14F        XRAM_AT_(0x800c);
XRAM_U8 P15F        XRAM_AT_(0x800d);
XRAM_U8 P16F        XRAM_AT_(0x800e);
XRAM_U8 P17F        XRAM_AT_(0x800f);

XRAM_U8 P20F        XRAM_AT_(0x8010);

XRAM_U8 P30F        XRAM_AT_(0x8018);

XRAM_U8 CKCON       XRAM_AT_(0x8080);
XRAM_U8 CKSEL       XRAM_AT_(0x8081);
XRAM_U8 CKDIV       XRAM_AT_(0x8082);
XRAM_U8 IHCFGL      XRAM_AT_(0x8083);
XRAM_U8 IHCFGH      XRAM_AT_(0x8084);
XRAM_U8 ILCFGL      XRAM_AT_(0x8085);


XRAM_U8 ADCALL      XRAM_AT_(0x8088);
XRAM_U8 ADCALH      XRAM_AT_(0x8089);
XRAM_U8 ACPDLL      XRAM_AT_(0x808a);
XRAM_U8 ACPDLH      XRAM_AT_(0x808b);
XRAM_U8 ACPDHL      XRAM_AT_(0x808c);
XRAM_U8 ACPDHH      XRAM_AT_(0x808d);
XRAM_U8 ADOPC       XRAM_AT_(0x808f);

XRAM_U8 ACPBC       XRAM_AT_(0x8094);

XRAM_U8 PWMPS       XRAM_AT_(0x8098);
XRAM_U8 PWMHS       XRAM_AT_(0x8099);
XRAM_U8 PWMFBC      XRAM_AT_(0x809a);
XRAM_U8 PWMFBS      XRAM_AT_(0x809b);
XRAM_U8 PWMSBC      XRAM_AT_(0x809c);
XRAM_U8 PWMBD       XRAM_AT_(0x809d);

XRAM_U8 T2CPPS      XRAM_AT_(0x80a0);
XRAM_U8 T2CPCHS     XRAM_AT_(0x80a1);
XRAM_U8 T2CPF       XRAM_AT_(0x80a2);
XRAM_U8 T2CPL       XRAM_AT_(0x80a3);
XRAM_U8 T2CPH       XRAM_AT_(0x80a4);

XRAM_U8 TMCON       XRAM_AT_(0x80a8);
XRAM_U8 TMSNU       XRAM_AT_(0x80a9);

XRAM_U8 SWICON      XRAM_AT_(0x80b0);
XRAM_U8 SWIDAT      XRAM_AT_(0x80b1);
XRAM_U8 SWISTA      XRAM_AT_(0x80b2);
XRAM_U8 SWIOVT      XRAM_AT_(0x80b3);

XRAM_U8 AMPAOS      XRAM_AT_(0x80b9);

XRAM_U8 BZCON       XRAM_AT_(0x80c0);
XRAM_U8 BZDIVL      XRAM_AT_(0x80c1);
XRAM_U8 BZDIVH      XRAM_AT_(0x80c2);
XRAM_U8 BZDUTL      XRAM_AT_(0x80c3);
XRAM_U8 BZDUTH      XRAM_AT_(0x80c4);

XRAM_U8 DCCR       	XRAM_AT_(0x80d0);
XRAM_U8 DCDS	    	XRAM_AT_(0x80d1);
XRAM_U8 DCDB      	XRAM_AT_(0x80d2);
XRAM_U8 DCB0HH      XRAM_AT_(0x80d3);
XRAM_U8 DCB0HL      XRAM_AT_(0x80d4);
XRAM_U8 DCB0LH      XRAM_AT_(0x80d5);
XRAM_U8 DCB0LL      XRAM_AT_(0x80d6);
XRAM_U8 DCB1HH      XRAM_AT_(0x80d7);
XRAM_U8 DCB1HL      XRAM_AT_(0x80d8);
XRAM_U8 DCB1LH      XRAM_AT_(0x80d9);
XRAM_U8 DCB1LL      XRAM_AT_(0x80da);
XRAM_U8 DCOVRH      XRAM_AT_(0x80db);
XRAM_U8 DCOVRL      XRAM_AT_(0x80dc);
XRAM_U8 DCFCR       XRAM_AT_(0x80dd);
XRAM_U8 TSCMD       XRAM_AT_(0x80f8);
XRAM_U8 TSSTA       XRAM_AT_(0x80f9);
XRAM_U8 TSSWC       XRAM_AT_(0x80fa);

XRAM_U8 SPMAX       XRAM_AT_(0x8100);
XRAM_U8 I2CIOS      XRAM_AT_(0x8101);

XRAM_U8 UDCKS1       XRAM_AT_(0x8118);
XRAM_U8 UDCKS2       XRAM_AT_(0x8119);
XRAM_U8 FTCTL       XRAM_AT_(0x811e);
XRAM_U8 TPCTL       XRAM_AT_(0x811f);

XRAM_U8 P00C        XRAM_AT_(0x8120);
XRAM_U8 P01C        XRAM_AT_(0x8121);
XRAM_U8 P02C        XRAM_AT_(0x8122);
XRAM_U8 P03C        XRAM_AT_(0x8123);
XRAM_U8 P04C        XRAM_AT_(0x8124);
XRAM_U8 P05C        XRAM_AT_(0x8125);
XRAM_U8 P06C        XRAM_AT_(0x8126);
XRAM_U8 P07C        XRAM_AT_(0x8127);

XRAM_U8 P10C        XRAM_AT_(0x8128);
XRAM_U8 P11C        XRAM_AT_(0x8129);
XRAM_U8 P12C        XRAM_AT_(0x812a);
XRAM_U8 P13C        XRAM_AT_(0x812b);
XRAM_U8 P14C        XRAM_AT_(0x812c);
XRAM_U8 P15C        XRAM_AT_(0x812d);
XRAM_U8 P16C        XRAM_AT_(0x812e);
XRAM_U8 P17C        XRAM_AT_(0x812f);

XRAM_U8 P20C        XRAM_AT_(0x8130);

XRAM_U8 P30C        XRAM_AT_(0x8138);

XRAM_U8 MECON       XRAM_AT_(0xfc00);
XRAM_U8 FSCMD       XRAM_AT_(0xfc01);
XRAM_U8 FSDAT       XRAM_AT_(0xfc02);
XRAM_U8 LOCK        XRAM_AT_(0xfc03);
XRAM_U8 PADRD       XRAM_AT_(0xfc04);
XRAM_U8 PTSL        XRAM_AT_(0xfc05);
XRAM_U8 PTSH        XRAM_AT_(0xfc06);
XRAM_U8 REPSET      XRAM_AT_(0xfc07);

#endif  // __CA51F003_XDATA_H__
